#-*- coding:UTF-8 -*-
def compareStrings(self, A, B):
    if len(B)==0:
        return True
    if len(A)==0:
        return False
    table=[0 for i in range(26)]
    for i in A:
        table[ord(i)-65]+=1
    for i in B:
        if table[ord(i)-65]==0:
            return False
        table[ord(i)-65]-=1
    return True

print  compareStrings("","ABC","AB")